<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/1/6
  Time: 14:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <link href="${pageContext.request.contextPath}/css/common.css" rel="stylesheet" type="text/css" />
    <link href="${pageContext.request.contextPath}/css/style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="wrap">
    <!-- main begin-->
    <div class="sale">
        <h1 class="lf">在线拍卖系统</h1>
        <div class="logout left">欢迎您：${sessionScope.login.userName} </div>
        <div class="logout right"><a href="${pageContext.request.contextPath}/user/exit" title="注销">注销</a></div>
    </div>
    <form enctype="multipart/form-data" action="${pageContext.request.contextPath}/auction/addAuction" method="post" class="login logns produce">
        <h1 class="blues">拍卖品信息</h1>
        <dl>
            <dd >
                <label>名称：</label>
                <input type="text" class="inputh lf" name="auction.auctionName" />
                <div class="xzkbg spbg lf"></div>
            </dd>
            <dd>
                <label>起拍价：</label>
                <input type="text" class="inputh lf" name="auction.auctionStartPrice" />
                <div class="lf red laba">必须为数字</div>
            </dd>
            <dd>
                <label>底价：</label>
                <input type="text" class="inputh lf" name="auction.auctionUpset" />
                <div class="lf red laba">必须为数字</div>
            </dd>
            <dd>
                <label>开始时间：</label>
                <input type="date" class="inputh lf" name="auction.auctionStartTime" />
                <div class="lf red laba">格式：2010-05-05</div>
            </dd>
            <dd>
                <label>结束时间：</label>
                <input type="date" class="inputh lf" name="auction.auctionEndTime" />
                <div class="lf red laba">格式：2010-05-06</div>
            </dd>
            <dd class="dds">
                <label>拍卖品图片：</label>
                <div class="lf salebd" id="preview"><img src="" width="100" height="100" /></div>
                <input name="cover" type="file" class="offset10 lf" onchange="preview(this)"/>

            </dd>
            <dd class="dds">
                <label>描述：</label>
                <textarea name="auction.auctionDesc" cols="" rows="" class="textarea"></textarea>
            </dd>
            <dd class="hegas">
                <input name="" type="submit" value="保 存" class="spbg buttombg buttombgs buttomb f14 lf" />
                <input name="" type="button" value="取 消" class="spbg buttombg buttombgs buttomb f14 lf" />
            </dd>
        </dl>
    </form>
    <!-- main end-->
    <!-- footer begin-->

</div>
<!--footer end-->

</div>


<script type="text/javascript">
    function preview(file) {
        var prevDiv = document.getElementById('preview');
        if (file.files && file.files[0]) {
            var reader = new FileReader();
            reader.onload = function(evt) {
                prevDiv.innerHTML = '<img width="100ox" height="100px" src="' + evt.target.result + '" />';
            }
            reader.readAsDataURL(file.files[0]);
        } else {
            prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';
        }
    }
</script>
</body>
</html>

